﻿<UserControl x:Class="MContracts.Controls.ResponsiblesListControl"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300">
    <Grid>
        <telerik:RadGridView ShowGroupPanel="False" RowIndicatorVisibility="Collapsed" 
                             CanUserDeleteRows="False" CanUserInsertRows="False"
                             AutoGenerateColumns="False"
                             ItemsSource="{Binding Path=Responsibles, Mode=OneWay, UpdateSourceTrigger=PropertyChanged}">
            <telerik:RadGridView.Columns>
                <telerik:GridViewComboBoxColumn Width="80"
                    DataMemberBinding="{Binding Path=Role, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" 
                    SelectedValueMemberPath="{Binding Path=Role, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" 
                    ItemsSource="{Binding Path=Roles, RelativeSource={RelativeSource AncestorType=UserControl}}"/>

                <telerik:GridViewComboBoxColumn Width="*"
                    DataMemberBinding="{Binding Path=Employee, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" 
                    SelectedValueMemberPath="{Binding Path=Employee, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" 
                    ItemsSource="{Binding Path=Employees, RelativeSource={RelativeSource AncestorType=UserControl}}"/>

            </telerik:RadGridView.Columns>
        </telerik:RadGridView>    
    </Grid>
</UserControl>
